// nav.js
const navLinks = [
  { href: "home.html", label: "Home" },
  { href: "notes.html", label: "Notes" },
  { href: "reports.html", label: "Reports" },
  { href: "docs.html", label: "Docs" },
  { href: "settings.html", label: "Settings" }

];
const path = location.pathname.split('/').pop();
let html = `
  <div class="nav">
    <div class="nav-links">
      ${navLinks.map(link => `
        <a href="${link.href}"${link.href === path ? ' class="active"' : ''}>${link.label}</a>
      `).join('')}
    </div>
  </div>
`;
const navContainer = document.getElementById('main-nav');
if (navContainer) navContainer.innerHTML = html; 